package com.lxp.modules.gyy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lxp.modules.gyy.domain.HrDepartment;
import com.lxp.modules.gyy.mapper.HrDepartmentMapper;
import com.lxp.modules.gyy.service.HrDepartmentService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Administrator
 * @description 针对表【hr_department(Department)】的数据库操作Service实现
 * @createDate 2024-02-29 11:35:10
 */
@Service
public class HrDepartmentServiceImpl extends ServiceImpl<HrDepartmentMapper, HrDepartment> implements HrDepartmentService {

    @Override
    public List<HrDepartment> getAllDeptList() {
        LambdaQueryWrapper<HrDepartment> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(HrDepartment::getActive, true);
        wrapper.eq(HrDepartment::getCompanyId, 1);
        wrapper.ne(HrDepartment::getId, 20);
        wrapper.ne(HrDepartment::getId, 21);
        wrapper.ne(HrDepartment::getId, 22);
        wrapper.ne(HrDepartment::getId, 23);
        wrapper.orderByAsc(HrDepartment::getId);
        return this.baseMapper.selectList(wrapper);
    }
}




